package cn.exrick.xboot.securityAdvisor.controllerImpl

import cn.exrick.xboot.base.service.IMessageService
import cn.exrick.xboot.base.vo.MessageDetailVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.securityAdvisor.controller.ISecurityAdvisorController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class SecurityMessageController: ISecurityAdvisorController.Message {

    @Autowired
    private val iMessageService: IMessageService? = null


    override fun createEnterpriseMessage(securityAdvisorId: Array<out String>): Result<Any?>? {

        return iMessageService!!.createEnterpriseMessage(securityAdvisorId)
    }

    override fun getMyMessageList(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iMessageService!!.getMyMessageList(pageVo)
    }

    override fun getMyReceiveMessageList(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iMessageService!!.getMyReceiveMessageList(pageVo)
    }

    override fun getMyAppMessageList(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iMessageService!!.getMyAppMessageList(pageVo)
    }

    override fun getMyAppMessageDetail(id: String): Result<MessageDetailVo>? {

        return iMessageService!!.getMyAppMessageDetail(id)
    }

    override fun getMyMessageUnReadCount(enterprise: Int): Result<Int>? {

        return iMessageService!!.getMyMessageUnReadCount(enterprise)
    }


}